Only invalidate timestamps if the node is marked as invalid. We overload
the meaning of "invalid" as "tracks timestamps".
While I don't like the way this is written, it is an important
optimization because 95+% of nodes don't animate so timestamps don't
matter to them. But timestamps are invalidated 60x per second.
gtk_css_node_invalidate (GtkCssNode *cssnode,
GtkCssChange change)
{
+ if (!cssnode->invalid)
+ change &= ~GTK_CSS_CHANGE_TIMESTAMP;
+
+ if (change == 0)
+ return;
+
cssnode->pending_changes |= change;
GTK_CSS_NODE_GET_CLASS (cssnode)->invalidate (cssnode);